home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5008 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: axl.dialup.fu-berlin.DE!not-for-mail
  2. From: axl@zedat.fu-berlin.de (Axel Thimm)
  3. Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
  4. Subject: Re: float != float and floats as return types
  5. Date: Fri, 02 Feb 1996 03:31:08 GMT
  6. Organization: FU Berlin
  7. Message-ID: <4es0ep$is2@fu-berlin.de>
  8. References: <DM19oy.KsJ@granite.mv.net>
  9. Reply-To: axl@zedat.fu-berlin.de
  10. NNTP-Posting-Host: axl.dialup.fu-berlin.de (160.45.218.93)
  11. X-Access: 16 17 19
  12. X-Newsreader: Forte Free Agent 1.0.82
  13.  
  14. Eli Zaretskii <eliz@is.elta.co.il> wrote:
  15. [...]
  16. >> -ffloat-store
  17.  
  18. >Just to make the picture complete: this switch should only be used in 
  19. >programs which break without it, because holding intermediate results in 
  20. >the most precise representation makes FP computations more accurate.  
  21. [...]
  22. >Another case of justified use of that switch is a program which explores 
  23. >the intricacies of the floating-point representation of a machine.
  24.  
  25. The reason I "expored" this behaviour was an optimization by hand of a
  26. simulation program. A lattices site value is very often used in
  27. quadratic terms, so introducing a second lattice and storing theese
  28. values seemed like just speeding up the process. I was amazed when the
  29. output changed (the results were still within the stat. error).
  30. So if someone is writing programs that can do exactly the same thing
  31. with two different implementations, then he would very much like to turn
  32. such optimizations temporarily off, to get the same results. Later he
  33. would turn them on again.
  34.  
  35. ===
  36. Axel Thimm <axl@zedat.fu-berlin.de>
  37. Freie Universitaet Berlin
  38. ===
  39.  
  40.